#include <57header.h>

/* Usage: ./01_open filename */
int main(int argc, char *argv[]){
    ARGS_CHECK(argc, 2);
    int fd = open(argv[1],O_WRONLY | O_CREAT | O_TRUNC, 0666);
    ERROR_CHECK(fd, -1, "open");
    printf("fd = %d\n", fd);

    // 用完就关闭它
    close(fd);
    return 0;
}

